import  React,{Component} from  'react'
import "../../css/shop/shop.css"
import {Link} from 'react-router';
const data=require('./data.json')
export  default  class ShopList extends  Component{
    constructor(props){
        super(props)
        this.state={
            obj:data.data.phone.wz
        }
    }
    render(){
        return(
            <ul className="shop_ul">
                {
                    this.state.obj.map(function(v,i){
                      return (
                          <li key={i}>
                              <Link to={{ pathname: '/shop_detail', query: { id: v.id } }}>
                              <img src={v.img} alt=""/>
                              <div className="shop_right">
                                  <p>{v.title}</p>
                                  <p>{v.price}</p>
                              </div>
                              </Link>
                          </li>
                      )
                    })
                }
            </ul>
        )
    }
}